<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {

	public function __construct()
	{
	     parent::__construct();
	}
	public function index()
	{
		if(!$this->session->userdata('user_id'))
		{
			redirect('user/login');
		}
		else 
		{
			$this->load->view('layout_header');
			$this->load->view('main');
			$this->load->view('layout_footer');
		}
	}
	public function search()
	{
		$search = $this->input->post('search');
		echo $search;
	}
}

/* End of file main.php */
/* Location: ./application/controllers/main.php */